import {TabItem, Tabs} from "@astrojs/starlight/components";

import FlattenedSteps from "../../components/FlattenedSteps.astro";
import NavigationSteps from "../../components/NavigationSteps.astro";
import DependsOnPermissions from "../include/_DependsOnPermissions.mdx";
import RightSidebarViewProfile from "../include/_RightSidebarViewProfile.mdx";

<DependsOnPermissions />

<Tabs>
  <TabItem label="Via group settings">
    <FlattenedSteps>
      <NavigationSteps target="relative/group/all" />

      1. Select a user group.
      1. Select the **Members** tab on the right.
      1. Under **Add members**, enter users you want to add. You can enter a
         `#channel` to add all subscribers to the group.
      1. Click **Add**. Zulip will notify everyone who is added to the group.
    </FlattenedSteps>
  </TabItem>

  <TabItem label="Via user profile">
    <FlattenedSteps>
      <RightSidebarViewProfile />

      1. Select the **User groups** tab.
      1. Under **Add user to groups**, enter the groups you want to add the
         user to. You can start typing to filter suggestions.
      1. Click the **Add** button. Zulip will notify the user about the groups
         they've been added to.
    </FlattenedSteps>
  </TabItem>
</Tabs>
